import request from '@/utils/request'

// 触发计算实际入库数
export function listNum() {
  return request({
    url: '/system/storagerequest/listNum',
    method: 'get'
  })
}
// 查询用于存储入库申请信息的列表
export function listStoragerequest(query) {
  return request({
    url: '/system/storagerequest/list',
    method: 'get',
    params: query
  })
}
// 查询入库明细表（已发卡，未入库）的资产
export function listRk(query) {
  return request({
    url: '/system/product/listRk',
    method: 'get',
    params: query
  })
}
 // 查询用于存储仓库信息的列表
 export function listWarehouse() {
 	var data = {
 		pageNum: 1,
 		pageSize: 10000,
 	}
   return request({
     url: '/system/warehouse/list',
     method: 'get',
     params: data
   })
 }
// 查询用于存储入库申请信息的详细
export function getStoragerequest(id) {
  return request({
    url: '/system/storagerequest/' + id,
    method: 'get'
  })
}

// 新增用于存储入库申请信息的
export function addStoragerequest(data,infoList) {
	data.infoList = infoList;
  return request({
    url: '/system/storagerequest',
    method: 'post',
    data: data
  })
}

// 修改用于存储入库申请信息的
export function updateStoragerequest(data,infoList) {
	data.infoList = infoList;
  return request({
    url: '/system/storagerequest',
    method: 'put',
    data: data
  })
}

// 删除用于存储入库申请信息的
export function delStoragerequest(id) {
  return request({
    url: '/system/storagerequest/' + id,
    method: 'delete'
  })
}
